﻿using Sc.Domain;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Script.Serialization;

namespace Sc.Web.Controllers
{
    public class ShendMessagesController : Controller
    {
        // GET: ShendMessages
        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 发送消息
        /// </summary>
        /// <returns></returns>
        public int SaveData()
        {
            var txtremark = Request.Params["txtremark"];
            var data = Request.Params["data"];

            JavaScriptSerializer json = new JavaScriptSerializer();
            var list = json.Deserialize<IList<TempUserModel>>(data);

            Service.CarInfoService cs = new Service.CarInfoService();
            return cs.SendMessages(list, txtremark);
        }
       
    }


}